/**
 * 
 */
package com.dsteiner.gwt.cafeteriasophia.client.model;

import java.beans.PropertyChangeListener;
import java.util.List;

import com.dsteiner.gwt.cafeteriasophia.client.domain.ShiftChange;
import com.dsteiner.widgets.client.PropertyChangeCollection;

public class ShiftChangeModel {
	private PropertyChangeCollection propertyChangeSupport = new PropertyChangeCollection(this);

	public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
		propertyChangeSupport.registerPropertyChangeListener(propertyName, listener);
	}

	private ShiftChange shiftChange = new ShiftChange();

	public ShiftChange getShiftChange() {
		return shiftChange;
	}

	public void setShiftChange(ShiftChange shiftChange) {
		ShiftChange oldShiftChange = this.shiftChange;
		this.shiftChange = shiftChange;
		propertyChangeSupport.firePropertyChange("shiftChange", oldShiftChange, shiftChange);
	}
	
	private ShiftChange lastShiftChange;

	public ShiftChange getLastShiftChange() {
		return lastShiftChange;
	}

	public void setLastShiftChange(ShiftChange lastShiftChange) {
		ShiftChange oldLastShiftChange = this.lastShiftChange;
		this.lastShiftChange = lastShiftChange;
		propertyChangeSupport.firePropertyChange("lastShiftChange", oldLastShiftChange, lastShiftChange);
	}
}